home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 227 < prev    next >
Encoding:
Text File  |  1996-08-06  |  2.4 KB  |  56 lines

  1. Path: engnews1.Eng.Sun.COM!taumet!clamage
  2. From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Time representations
  5. Date: 1 Feb 1996 22:45:59 GMT
  6. Organization: SEL
  7. Sender: news@lts.sel.alcatel.de
  8. Approved: clamage@eng.sun.com (comp.std.c++)
  9. Message-ID: <KANZE.96Feb1124302@slsvewt.lts.sel.alcatel.de>
  10. References: <4emq2k$ecu@news.duke.edu> <tuivhsd7fn.fsf@nemo.bedford.waii.com>
  11. NNTP-Posting-Host: taumet.eng.sun.com
  12. Content-Type: text
  13. In-Reply-To: gsez020@nemo.bedford.waii.com's message of 01 Feb 96 02:09:05 GMT
  14. Apparently-To: std-c++@ncar.ucar.edu
  15. Content-Length: 1617
  16. Originator: clamage@taumet
  17.  
  18. In article <tuivhsd7fn.fsf@nemo.bedford.waii.com>
  19. gsez020@nemo.bedford.waii.com (Pete Forman) writes:
  20.  
  21. |> >>>>> "Max" == Max TenEyck Woodbury <mtew@cds.duke.edu> writes:
  22.  
  23. |>     Max> First, the range specified for tm_sec is 0-59.
  24.  
  25. |> My documentation (IRIX 6.1) gives the range as 0-61.  I presume that
  26. |> the current standard does cover leap seconds and that your copy is out
  27. |> of date.  I don't understand why it's not 0-60, though.
  28.  
  29. A bug in the C standard:-).  This was discussed some time back on
  30. comp.std.c.  If I remember correctly, the correction from 0-59 was
  31. made at the last minute.  It was pointed out that there had even been
  32. a year with two leap seconds, so they made provision for two leap
  33. seconds:-).  Of course, with a maximum of two leap seconds per year,
  34. no one is going to put them in the same hour.
  35.  
  36. |> Your remaining points have little relevance.  localtime() and friends
  37. |> are indeed only useful for the Gregorian calendar.  If you were to try
  38. |> to extend to other calendars you would have difficulty specifying the
  39. |> rules.  Days may start at dusk, months according to observations of
  40. |> the moon.  Programs can only approximate the future and look up the
  41. |> past.
  42.  
  43. Agreed.  There is a package on the net somewhere that will handle all
  44. of the other time systems, though.  Or so I have heard.
  45. --
  46. James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
  47. GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
  48. Conseils, Θtudes et rΘalisations en logiciel orientΘ objet --
  49.                 -- A la recherche d'une activitΘ dans une region francophone
  50.  
  51.  
  52. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  53.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy is
  54.   summarized in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  55. ]
  56.